<template>
  <div class="dashboard">
    <div class="welcome-card">
      <h1>欢迎使用 VUE-XIAOMAI 管理系统</h1>
      <p>请从左侧菜单选择功能模块</p>
      
      <div class="stats-cards">
        <el-row :gutter="20">
          <el-col :span="6">
            <div class="stat-card">
              <div class="stat-icon user-icon">
                <el-icon><User /></el-icon>
              </div>
              <div class="stat-content">
                <div class="stat-number">128</div>
                <div class="stat-label">员工总数</div>
              </div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="stat-card">
              <div class="stat-icon dept-icon">
                <el-icon><OfficeBuilding /></el-icon>
              </div>
              <div class="stat-content">
                <div class="stat-number">8</div>
                <div class="stat-label">部门数量</div>
              </div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="stat-card">
              <div class="stat-icon notice-icon">
                <el-icon><ChatDotRound /></el-icon>
              </div>
              <div class="stat-content">
                <div class="stat-number">24</div>
                <div class="stat-label">今日公告</div>
              </div>
            </div>
          </el-col>
          <el-col :span="6">
            <div class="stat-card">
              <div class="stat-icon leave-icon">
                <el-icon><Calendar /></el-icon>
              </div>
              <div class="stat-content">
                <div class="stat-number">5</div>
                <div class="stat-label">待审批</div>
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script setup>
import { User, OfficeBuilding, ChatDotRound, Calendar } from '@element-plus/icons-vue'
</script>

<style scoped>
.dashboard {
  padding: 20px;
}

.welcome-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-card h1 {
  margin-bottom: 16px;
  color: #303133;
  font-size: 28px;
  text-align: center;
}

.welcome-card p {
  color: #606266;
  font-size: 16px;
  text-align: center;
  margin-bottom: 40px;
}

.stats-cards {
  margin-top: 30px;
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #ebeef5;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 24px;
  color: #fff;
}

.user-icon {
  background: #409eff;
}

.dept-icon {
  background: #67c23a;
}

.notice-icon {
  background: #e6a23c;
}

.leave-icon {
  background: #f56c6c;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 24px;
  font-weight: bold;
  color: #303133;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: #909399;
}
</style>